import yaml
import pprint

f=open('tree.yaml')
dataMap=yaml.load(f)
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(dataMap)
f.close()
